<!DOCTYPE html>
<html>
<head>
  <title>OHPM Package Badge Service</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" href="/public/favicon.ico" type="image/x-icon">
  <style>
    :root {
      --primary-color: #2c3e50;
      --secondary-color: #3498db;
      --background-color: #f8f9fa;
      --text-color: #333;
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      max-width: 800px;
      margin: 2rem auto;
      padding: 0 1rem;
      background-color: var(--background-color);
      color: var(--text-color);
    }

    header {
      text-align: center;
      margin-bottom: 2rem;
    }

    h1 {
      color: var(--primary-color);
      font-size: 2.5rem;
      margin-bottom: 0.5rem;
    }

    .subtitle {
      color: #666;
      font-size: 1.2rem;
    }

    .content {
      background: white;
      padding: 2rem;
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .example {
      margin: 2rem 0;
      border-radius: 6px;
    }

    .badge-example {
      display: flex;
      flex-direction: column-reverse;
      align-items: start;
      gap: 1rem;
      margin: 1rem 0;
      background: var(--background-color);
      padding: 1rem;
    }

    code {
      background: var(--background-color);
      padding: 0.2rem 0.4rem;
      border-radius: 4px;
      font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    }

    pre {
      background: var(--background-color);
      padding: 1rem;
      border-radius: 6px;
      overflow-x: auto;
    }

    a {
      color: var(--secondary-color);
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    img {
      border-radius: 4px;
    }

    footer {
      text-align: center;
      margin-top: 2rem;
      color: #666;
    }
  </style>
</head>
<body>
  <header>
    <h1>OHPM Package Badge Service</h1>
    <div class="subtitle">Generate beautiful badges for your OHPM packages</div>
  </header>

  <div class="content">
    <section>
      <h2>Usage</h2>
      <p>Simply use the following URL pattern:</p>
      <pre>https://ohpmico.vercel.app/&lt;package-name&gt;.svg</pre>
    </section>

    <section class="example">
      <h2>Example</h2>
      <div class="badge-example">
        <img src="https://ohpmico.vercel.app/@pura/harmony-utils.svg" alt="Example Badge" />
        <div>
          <p>URL:
            <a href="https://ohpmico.vercel.app/@pura/harmony-utils.svg">
              https://ohpmico.vercel.app/@pura/harmony-utils.svg
            </a>
          </p>
          <p>MarkDown:</p>
          <pre>![](https://ohpmico.vercel.app/@pura/harmony-utils.svg)</pre>
        </div>
      </div>
    </section>

    <section>
      <h2>Features</h2>
      <ul>
        <li>Real-time package information</li>
        <li>Customizable badge size</li>
        <li>Supports scoped packages (@scope/package)</li>
        <li>Markdown ready</li>
      </ul>
    </section>
  </div>

  <footer>
    &copy; 2025 OHPM Badge Service by <a href="https://github.com/ohpmico/ohpmico">@ohpmico/ohpmico</a>
  </footer>
</body>
</html>